<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$item = $this->item;
$params = $this->item->params;

$img_align = $params->get('align',0);
$autoresize = $params->get('autoresize',0);
$maxchars = $params->get('maxchars');
$showimage = $params->get('showimage',0);
$img_w = $params->get('width',0);
$img_h = $params->get('height',0);
$hiddenClasses = $params->get('hiddenClasses');

?>

<?php
	$image = JANewsHelper::replaceImage ($this->item, $img_align, $autoresize, $maxchars, $showimage, $img_w, $img_h, $hiddenClasses);
?>
<div class="jazin-box clearfix">
<?php if ($this->user->authorize('com_content', 'edit', 'content', 'all')) : ?>
	<div class="contentpaneopen_edit<?php echo $params->get( 'pageclass_sfx' ); ?>" style="float: left;">
		<?php echo JHTML::_('icon.edit', $item, $params, $this->access); ?>
	</div>
<?php endif; ?>
<div class="jazin-content clearfix">
<?php if ($params->get('show_title',1)) : ?>
<h4 class="jazin-title">
	<?php if ($params->get('link_titles') && $item->readmore_link != '') : ?>
	<a href="<?php echo $item->readmore_link; ?>" class="contentpagetitle<?php echo $params->get( 'pageclass_sfx' ); ?>">
		<?php echo $item->title; ?>
	</a>
	<?php else : ?>
		<?php echo $item->title; ?>
	<?php endif; ?>
</h4>
<?php endif; ?>

<?php  if (!$params->get('show_intro')) :
	echo $item->event->afterDisplayTitle;
endif; ?>

<?php
if (
($params->get('show_create_date'))
|| (($params->get('show_author')) && ($item->author != ""))
|| ($params->get('show_pdf_icon') || $params->get('show_print_icon') || $params->get('show_email_icon'))
|| ($params->get('show_url') && $item->urls)
) :
?>
<div class="article-tools clearfix">
<div class="article-meta">

<?php if ($params->get('show_create_date')) : ?>
	<span class="createdate">
		<?php echo JHTML::_('date', $item->created, JText::_('DATE_FORMAT_LC2')); ?>
	</span>
<?php endif; ?>

<?php if (($params->get('show_author')) && ($item->author != "")) : ?>
	<span class="createby">
		<?php JText::printf(($item->created_by_alias ? $item->created_by_alias : $item->author) ); ?>
	</span>
<?php endif; ?>

</div>

<?php if ($params->get('show_url') && $item->urls) : ?>
	<span class="article-url">
		<a href="http://<?php echo $item->urls ; ?>" target="_blank">
			<?php echo $item->urls; ?></a>
	</span>
<?php endif; ?>
</div>
<?php endif; ?>

<?php echo $item->event->beforeDisplayContent; ?>

<div class="article-content">
<?php if (isset ($item->toc)) : ?>
	<?php echo $item->toc; ?>
<?php endif; ?>
<?php echo $image; ?>
<?php echo $this->maxchar?$item->introtext1:$item->introtext; ?>
</div>

<?php if ( intval($item->modified) != 0 && $params->get('show_modify_date')) : ?>
	<p class="modifydate">
		<?php echo JText::_( 'Last Updated' ); ?> ( <?php echo JHTML::_('date', $item->modified, JText::_('DATE_FORMAT_LC2')); ?> )
	</p>
<?php endif; ?>

<?php if ($params->get('show_readmore') && $item->readmore) : ?>
	<a href="<?php echo $item->readmore_link; ?>" title="<?php echo $item->title; ?>" class="readon<?php echo $params->get('pageclass_sfx'); ?>">
			<?php if ($item->readmore_register) : ?>
				<?php echo JText::_('Register to read more...'); ?>
			<?php else : ?>
				<?php echo JText::_('Read more...'); ?>
			<?php endif; ?>
	</a>
<?php endif; ?>

</div>

<?php echo $item->event->afterDisplayContent; ?>
</div>